/**
 * 存储前端字典,如果想将其转化为用于下拉框的格式,请调用util.convertMapToArray方法
 */
import utils from '@/common/utils.js'

// -----------------------------------------------消息相关的字典
// 消息的主题类型


export const msgTheme = utils.dict({
  TRAIN_PLAN_RELEASE: {value: 100, label: "列车-计划发布", showComplete: true},
  TRAIN_WORK_ORDER_SUBMIT: {value: 101, label: "列车-工单提交", showComplete: true},
  TRAIN_WORK_ORDER_FALLBACK: {value: 102, label: "列车-工单回退", showComplete: true},
  TRAIN_WORK_ORDER_ACQUIRE: {value: 103, label: "列车-工单领取", showComplete: true},
  TRAIN_FAULT_CREATE: {value: 110, label: "列车-故障创建", showComplete: true},
  TRAIN_FAULT_BACK_FILL: {value: 111, label: "列车-故障提交", showComplete: true},
  TRAIN_TCMS_ERROR: {value: 120, label: "列车-预警信息", showComplete: true},
  TRAIN_PLAN_CREATE_ORDER: {value: 150, label: "列车-计划生成工单", showComplete: true},
  TRAIN_WORK_ORDER_SUB_UNCOMMITTED_OVERTIME: {value: 151, label: "列车-子工单领取后超时未提交", showComplete: true},
  AUXILIARY_SCHEDULING_SUCCESS: {value: 160, label: "列车-辅助排产生成", showComplete: true},
  PASSAGE_CREW_SHIFTING_TASK: {value: 180, label: "乘务-轮乘任务派发", showComplete: true},
  PASSAGE_CREW_SHIFTING_DRIVER_CHANGE: {value: 181, label: "乘务-轮乘任务调整", showComplete: true},
  PASSAGE_CREW_SHIFTING_RE_TASK: {value: 182, label: "乘务-轮乘任务重新生成", showComplete: true},
  IMMED_DISPATCH_RELEASE: {value: 200, label: "接诉即办-派单工单发布", showComplete: true},
  IMMED_DISPATCH_APPROVAL: {value: 201, label: "接诉即办-派单工单审批", showComplete: true},
  IMMED_DISPATCH_REPLY: {value: 202, label: "接诉即办-工单审批未通过", showComplete: true},
  IMMED_DISPATCH_SUPERVISE: {value: 203, label: "接诉即办-工单被督办", showComplete: true},
  IMMED_SOON_TIMEOUT_MSG: {value: 204, label: "接诉即办-工单即将超时", showComplete: true},
  APPROVAL: {value: 400, label: "审核", showComplete: true},
  APPROVAL_PASS: {value: 401, label: "审核成功", showComplete: true},
  APPROVAL_REJECT: {value: 402, label: "审核驳回", showComplete: true},
  ENERGY_CONTRACT_CHARGE_CYCLE: {value: 601, label: "能源-合同收费消息", showComplete: true},
  QUALITY_PLAN_CREATE_ORDER: {value: 701, label: "【质检】质检计划生成工单!"},
  INSPECTION_PLAN_CREATE_ORDER: {value: 801, label: "【巡检】巡检计划生成工单!"},
})

// 消息的类型
export const msgType = utils.dict({
  TO_DO: {label: '待办', value: 0},
  NOTICE: {label: '消息', value: 1}
})
// 消息的处理状态
export const msgHandleStatus = utils.dict({
  UN_READ: {label: '未读', value: 0},
  HANDLED: {label: '已读', value: 1}
})
// 消息的级别
export const msgLevel = utils.dict({
  LOW: {label: '低', value: 1},
  MEDIUM: {label: '中', value: 2},
  HIGH: {label: '高', value: 3},
  HIGHER: {label: '紧急', value: 4},
})


export const SysModule = utils.dict({
  HOME: {value: 0, label: '主系统'},
  BOARD: {value: 1, label: '看板'}
})

// 位置类型
export const positionType = utils.dict({
  COMPANY: {value: 0, label: '分公司'},
  LINE: {value: 1, label: '线路'},
  DEPOT: {value: 2, label: '车辆段'},
  AREA: {value: 3, label: '区域'},
  TRACK: {value: 4, label: '股道'},
  BUILDING: {value: 5, label: '楼'},
  FLOOR: {value: 6, label: '楼层'},
  ROOM: {value: 7, label: '房间号'},
  //STATION_AREA: {value: 8, label: '站区'},
  STATION_POINT: {value: 9, label: '站点'},
  SECTION: {value: 10, label: '区间'}
})
// 位置用途
export const positionToUse = utils.dict({
  PARK: {value: 1, label: '停车'},
  WASH_TRAIN: {value: 2, label: '洗车'},
  REPAIR_TRAIN: {value: 3, label: '旋轮'},
})


// 流程节点状态
export const approveNodeStatus = utils.dict({
  START: {label: '审核中', value: 0},
  APPROVE_PASS: {label: '通过', value: 1},
  APPROVE_REJECT: {label: '驳回', value: 2}
})
// 审批模块
export const approvalModel = utils.dict({
  TRAIN_YEAR_PLAN: {label: '车辆年计划', value: 12},
  TRAIN_MONTH_PLAN: {label: '车辆月计划', value: 13},
  TRAIN_OPERATIONAL_LOG: {label: '运营日志', value: 14},
})
// 审批流程实例状态
export const approveStatus = utils.dict({
  NO_START: {value: 0, label: '未审核'},
  UNDERWAY: {value: 1, label: '审核中'},
  COMPLETE_SUCCESS: {value: 2, label: '审核完成'},
  COMPLETE_REJECT: {value: 3, label: '审核拒绝'},
})
// 是否
export const yesOrNo = utils.dict({
  NO: {label: '否', value: 0},
  YES: {label: '是', value: 1},
})
// 会议类型配置状态
export const meetingTypeConfigStatus = utils.dict({
  NOT_REQUIRED: {label: '不需要', value: 0},
  NOT_FORCE: {label: '不强制', value: 1},
  FORCE: {label: '强制', value: 2},
})
// 车厢类型
/*export const trainCarriageType = utils.dict({
  CARRIAGE_FOUR: {label: '4位车厢', value: 0},
  CARRIAGE_TWO: {label: '2位车厢', value: 1},
})*/

//是否必须
export const necessaryOrNot = utils.dict({
  NO: {value: 0, label: "不必须"},
  YES: {value: 1, label: "必须"}
})
// 是否正常
export const normalOrNot = utils.dict({
  YES: {value: 0, label: "正常"},
  NO: {value: 1, label: "异常"}
})

// 审批结果
export const approvalStatus = utils.dict({
  WAIT_APPROVAL: {label: '待审批', value: 0},
  PASS: {label: '通过', value: 1},
  REJECT: {label: '驳回', value: 2},
})
